From 17896bb74f89c4b840054b9a3bb51f66f01e70b5 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 27 May 2005 15:52:19 +0000 Subject: [PATCH] Accept the 108 byte header of BMP v4. (#168799) 2005-05-27 Matthias Clasen * io-bmp.c: Accept the 108 byte header of BMP v4. (#168799) --- gdk-pixbuf/ChangeLog | 4 ++++ gdk-pixbuf/io-bmp.c | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index 75e10077c3..2a0d75a8fd 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,7 @@ +2005-05-27 Matthias Clasen + + * io-bmp.c: Accept the 108 byte header of BMP v4. (#168799) + 2005-05-25 Matthias Clasen * gdk-pixbuf.symbols: diff --git a/gdk-pixbuf/io-bmp.c b/gdk-pixbuf/io-bmp.c index ffde9ab123..eecef9efac 100644 --- a/gdk-pixbuf/io-bmp.c +++ b/gdk-pixbuf/io-bmp.c @@ -265,7 +265,12 @@ static gboolean DecodeHeader(unsigned char *BFH, unsigned char *BIH, #endif State->Header.size = lsb_32 (&BIH[0]); - if (State->Header.size == 40) { + if (State->Header.size == 108) { + State->Header.width = lsb_32 (&BIH[4]); + State->Header.height = lsb_32 (&BIH[8]); + State->Header.depth = lsb_16 (&BIH[14]); + State->Compressed = lsb_32 (&BIH[16]); + } else if (State->Header.size == 40) { State->Header.width = lsb_32 (&BIH[4]); State->Header.height = lsb_32 (&BIH[8]); State->Header.depth = lsb_16 (&BIH[14]); -- 2.30.2